<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class MY_Model extends CI_Model
{
    /**
     * 设置table 显示10条数据
     * @var integer $limit
     */
    protected $limit = 10;

    /**
     * API 返回值
     * code -1 请求失败
     * @var array
     */
    protected $failed = array(
        'code' => -1,
        'message' => "请求失败"
    );

    /**
     * API 返回值
     * code 1000 请求成功
     * @var array
     */
    protected $success = array(
        "code" => 1000,
        "message" => "请求成功",
        "data" => array()
    );

    /**
     * API 返回值
     * code 1001 参数错误
     * @var array
     */
    protected $param_error = array(
        "code" => 1001,
        "message" => "参数错误",
    );

    /**
     * API 返回值
     * code 1002 认证失效
     * @var array
     */
    protected $verify_error = array(
        "code" => 1002,
        "message" => "用户过期",
    );

    /**
     * API 返回值
     * code 1003 权限错误
     * @var array
     */
    protected $privilege_error = array(
        "code" => 1003,
        "message" => "没有权限",
    );
}